
#include "iostream"
#include "vector"
#include "unordered_map"
#include "algorithm"
#include "string"
#include "list"
class Solution{
public:
};


int main() {
//    std::list<int> list1;
//    int c=0;int b=0;
////    bool first= true;
    int a;
    while(1){
        std::string s1,s2;
        if(std::getline(std::cin,s1)){
        }else{
            break;
        }
        std::getline(std::cin,s2);
        auto i=s1.find(s2);
        i++;
        printf("%d\n",i);
    }
    return 0;
}

